<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    // 对象的重要方法-Object.keys-获取对象键名，配合foreach打印对象值
    const obj = {
        id: 10001,
        name: 'Bit',
        age: 9,
        address: '陕西省西安市⾼新区沣惠南路34号'
    }
    Object.keys(obj).forEach((key) => {
        console.log(key,obj[key])
    })
</script>
</html>